home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_02_09
/
2n09061c
< prev
next >
Wrap
Text File
|
1991-07-30
|
905b
|
41 lines
rBEGIN
OPEN Master;
OPEN Update;
WHILE FETCH Update.*
DO BEGIN
CASE UpdateList.action
"A": BEGIN
WHILE (Master.key < Update.key)
DO FETCH Master.*;
INSERT Update.* INTO Master;
END;
"B": BEGIN /* Position to old record in master file */
WHILE (Master.key < Update.key)
DO FETCH Master.*;
END;
"C": BEGIN /* B ought to put you on the right record */
IF (Master.key = Update.key)
THEN BEGIN
DELETE Master.*;
INSERT Update.* INTO Master;
FETCH Master;
END;
END;
"D": BEGIN
WHILE Master.key < Update.key)
DO FETCH Master.*;
IF (Master.key = Update.key)
THEN DELETE Master.*;
END;
END;
CLOSE Master;
SORT Master ON Master.key;
CLOSE Update;
END;